using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Text.RegularExpressions;
using System.Xml;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Dimok.Data.Database;
using Dimok.User;

namespace Dimok.GLRules {
	public class Programs : System.Web.UI.Page {
		protected Literal ltrPrograms;
		protected Literal ltrBanks;
		protected UserObject uox = new UserObject();

		private void Page_Load(object sender, System.EventArgs e) {
			string bankID = UserObject.GetQueryParam("BankID");
			string sql = bankID != "" ? "SELECT ID, BankID, Name, Description, Position, MatrixUrl, MatrixPages, MatrixChanged, RatesUrl, RatesPages, RatesChanged,InputFunctionName FROM t_LoanProgram WHERE BankID = ? AND ID > 0 ORDER BY Position" : "SELECT TOP 0 * FROM t_LoanProgram";
			ltrPrograms.Text = SQLHelperEx.ADOToString(uox.dbADO_GL,sql,bankID);
			ltrBanks.Text = SQLHelperEx.BuildSelectOptions(uox.db_GL,"SELECT * FROM t_Bank ORDER BY Name","Name","ID");
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e) {
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent() {    
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
	}
}